package com.cyy.i.proxy;

import com.cyy.i.dao.IUserDao;

/**
 * @Author: Cyy
 * @Description: 代理对象，静态代理
 * @Date:Created in 17:05 2018/7/19
 */
public class StaticUserDaoProxy implements IUserDao{

    private IUserDao target;

    public StaticUserDaoProxy(IUserDao target) {
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("执行目标事务前的操作。。。");
        target.save();
        System.out.println("执行目标事务后的操作。。。");
    }
}
